import request from '@/utils/request'

// 查询工序列表
export function listProcedure(query) {
  return request({
    url: '/base/procedure/list',
    method: 'get',
    params: query
  })
}

// 查询工序详细
export function getProcedure(id) {
  return request({
    url: '/base/procedure/' + id,
    method: 'get'
  })
}

// 新增工序
export function addProcedure(data) {
  return request({
    url: '/base/procedure',
    method: 'post',
    data:{
      "procedureName": data.procedureName,
      "procedureClassifyNo": data.procedureClassifyNo,
      "comment":data.comment,
      "procedureClassifyNo": data.procedureClassifyNo,
      "teamNoList": data.teamNoList
    }
  })
}

// 修改工序
export function updateProcedure(data) {
  return request({
    url: '/base/procedure',
    method: 'put',
    data:{
      "id": data.id,
      "procedureName": data.procedureName,
      "procedureClassifyNo": data.procedureClassifyNo,
      "comment":data.comment,
      "teamNoList": data.teamNoList
    }
  })
}

// 删除工序
export function delProcedure(id) {
  return request({
    url: '/base/procedure/' + id,
    method: 'delete'
  })
}



export function listManagement(query) {
  return request({
    url: '/base/management/list',
    method: 'get',
    params: {
      "teamStatus":"0"
    }

  })
}





// 查询工序分类列表
export function listProcedureClassify(query) {
  return request({
    url: '/base/ProcedureClassify/list',
    method: 'get',
    params: query
  })
}
